package com.fire.control.system.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TNoticeDetail entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_notice_detail", catalog = "fire_control_system")
public class NoticeDetail extends BaseEntity {

	private static final long serialVersionUID = 1L;
	
	@Column(name = "title", nullable = false,length=50)
	private String title;
	
	@Column(name = "notice_content")
	private String noticeContent;
	
	@Column(name = "send_status")
	private String sendStatus;
	
	@ManyToOne(cascade={CascadeType.REFRESH},  
            fetch=FetchType.LAZY,optional=false)
	@JoinColumn(name = "notice_id")
	private Notice notice;
	
	@Column(name = "recive_time", nullable = false)
	@Temporal(TemporalType.DATE)
	private Date reciveTime;
	
	@OneToOne
    @JoinColumn(name="user_id" )
	private User user;

	
	public String getSendStatus() {
		return sendStatus;
	}

	public void setSendStatus(String sendStatus) {
		this.sendStatus = sendStatus;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getNoticeContent() {
		return noticeContent;
	}

	public void setNoticeContent(String noticeContent) {
		this.noticeContent = noticeContent;
	}

	public Notice getNotice() {
		return notice;
	}

	public void setNotice(Notice notice) {
		this.notice = notice;
	}

	public Date getReciveTime() {
		return reciveTime;
	}

	public void setReciveTime(Date reciveTime) {
		this.reciveTime = reciveTime;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	

}